package coreentity

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type HtPlat struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Name string `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:名称;"`

	Pid int64 `json:"pid,string"                       gorm:"column:pid;DEFAULT:0;not null;comment:父编号;"`

	Memo string `json:"memo"                             gorm:"column:memo;DEFAULT:'';not null;comment:备注;"`
}

func (p *HtPlat) TableName() string {
	return "HtPlat"
}

func HtPlatInit() {

	var mcls = &HtPlat{}
	var m = &corestruct.MyClass{
		Name:     "平台表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddEntity(m)
}
